package ij.hkust;

import ij.IJ;

import java.io.File;

/**
 * we use this to get images we want
 * 
 * @author liuquan
 * 
 */
public class Camera {

	public static int imageCount;
	public static double intervalTime;
	public static String savePath;
	public static int channel;
	public static int totalCount = 0;
	
	/**
	 * start to take picture
	 */
	public static void snap(int imageCount, double intervalTime,String savePath,int channel) {
		
		Camera.imageCount = imageCount;
		Camera.intervalTime = intervalTime;
		Camera.savePath = savePath;
		Camera.channel = channel;
		File file = new File(savePath);
		if(file.isDirectory() && !file.exists()){
			file.mkdirs();
		}
		IJ.run("camera");
		
	}
}
